package com.omuao.cloud.stabilization.message.consumer;

import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.stereotype.Component;

/**
 * 消息流消费者
 *
 * @author yumi
 */
@Component
@EnableBinding(Sink.class)
public class MessageStreamConsumer {

    /**
     * 消费者
     *
     * @param message
     */
    @StreamListener(Sink.INPUT)
    public void onMessage(Object message) {
        System.out.println(message);
    }

}
